package com.system.Daos;
import java.sql.*;

public class MySQLExample {
    public Connection getCon() throws SQLException {
        String url = "jdbc:mysql://localhost:3306/school"; // 数据库 URL
        String username = "admin"; // 数据库用户名
        String password = "admin123"; // 数据库密码

        Connection con = DriverManager.getConnection(url, username, password);
        return con;
    }
}